| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Public Member Functions | List of all members
nkGraphics::CameraManager Class Referencefinal

Manages the cameras recorded. More...

Inheritance diagram for nkGraphics::CameraManager:

## Public Member Functions
Camera * | getActiveRenderCamera () const
Camera * | getActiveCullingCamera () const
Camera * | getActiveLodCamera () const
Camera * | getDefaultCamera () const
void | setActiveRenderCamera (Camera *cam)
void | setActiveCullingCamera (Camera *cam)
void | setActiveLodCamera (Camera *cam)
void | setDefaultCamera (Camera *cam)
void | resetRenderCameraToDefault ()
void | resetCullingCameraToDefault ()
void | resetLodCameraToDefault ()
void | prepareForContext (RenderContext *context)
Public Member Functions inherited from nkGraphics::Manager< Camera >
Camera * | createOrRetrieve (nkMemory::StringView name)
Camera * | record (nkMemory::StringView name, nkMemory::UniquePtr< Camera > resource)
Camera * | get (nkMemory::StringView name) const
Camera * | getByIndex (unsigned int index) const
void | rename (nkMemory::StringView currentName, nkMemory::StringView newName)
void | erase (nkMemory::StringView name)
nkMemory::UniquePtr< Camera > | relinquish (nkMemory::StringView name)

## Detailed Description

Manages the cameras recorded.

Camera creation / deletion can go through this class, allowing it to act as a repository of resources which lifetime will get managed as needed. Like any Manager, it is always owning the memory it owns, unless it passes back the ownership explicitly.

## Member Function Documentation

## ◆ getActiveRenderCamera()

Camera* nkGraphics::CameraManager::getActiveRenderCamera | ( |  | ) | const

Returns
  The current active render camera.

## ◆ getActiveCullingCamera()

Camera* nkGraphics::CameraManager::getActiveCullingCamera | ( |  | ) | const

Returns
  The current active culling camera.

## ◆ getActiveLodCamera()

Camera* nkGraphics::CameraManager::getActiveLodCamera | ( |  | ) | const

Returns
  The current active lod camera.

## ◆ getDefaultCamera()

Camera* nkGraphics::CameraManager::getDefaultCamera | ( |  | ) | const

Returns
  The default camera to use.

## ◆ setActiveRenderCamera()

void nkGraphics::CameraManager::setActiveRenderCamera | ( | Camera * | cam | ) |

Sets the active render cam to use. Serves as a reference for feeding shaders with matrices during a pass.

Parameters

  cam | The camera to use.

## ◆ setActiveCullingCamera()

void nkGraphics::CameraManager::setActiveCullingCamera | ( | Camera * | cam | ) |

Sets the active culling cam to use. Serves as a reference for culling render queues rendered during a pass.

Parameters

  cam | The camera to use.

## ◆ setActiveLodCamera()

void nkGraphics::CameraManager::setActiveLodCamera | ( | Camera * | cam | ) |

Sets the active lod cam to use. Serves as a reference for selecting LOD during a pass.

Parameters

  cam | The camera to use.

## ◆ setDefaultCamera()

void nkGraphics::CameraManager::setDefaultCamera | ( | Camera * | cam | ) |

Sets the default cam to use when no camera is specified for a pass.

Parameters

  cam | The camera to use.

## ◆ resetRenderCameraToDefault()

void nkGraphics::CameraManager::resetRenderCameraToDefault | ( |  | ) |

Resets the rendering cam to the default one.

## ◆ resetCullingCameraToDefault()

void nkGraphics::CameraManager::resetCullingCameraToDefault | ( |  | ) |

Resets the culling cam to the default one.

## ◆ resetLodCameraToDefault()

void nkGraphics::CameraManager::resetLodCameraToDefault | ( |  | ) |

Resets the LOD cam to the default one.

## ◆ prepareForContext()

void nkGraphics::CameraManager::prepareForContext | ( | RenderContext * | context | ) |

Prepare the active cameras with the ones that have been set for a context.

Parameters

  context | The context that should populate the active cameras.

Remarks
  This method is called when setting up a context for rendering. If such a setup is required, it is probably safer to directly call RenderContextManager::activateContext(), to ensure the context setup is complete.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsGraphics/Cameras/CameraManager.h